package com.lagou.bean;

import lombok.Builder;
import lombok.Data;

import java.util.Date;

@Data
@Builder
public class BeanMonitor implements Comparable<BeanMonitor>{

    private String serviceName;

    private String methodName;

    private long invokeTime;

    private Date statisticsDate;

    @Override
    public int compareTo(BeanMonitor o) {
        return Long.compare(invokeTime,o.getInvokeTime());
    }

    public String getMethodReferenceName(){
        return getServiceName() + "." + getMethodName();
    }
}
